import request from '@/utils/request'
export default {
  //1 添加课程信息
  saveCourse(courseInfoVo) {
    return request({
      url: '/eduservice/course/saveCourse',
      method: 'post',
      data: courseInfoVo
    })
  },

  updateCourse(courseInfoVo) {
    return request({
      url: '/eduservice/course/updateCourse',
      method: 'post',
      data: courseInfoVo
    })
  },

  getCourse(courseId) {
    return request({
      url: `/eduservice/course/getCourse/${courseId}`,
      method: 'get',
    })
  },

  getCourseList() {
    return request({
      url: `/eduservice/course/getCourseList`,
      method: 'get',
    })
  },

  getCoursesByCondition(current,pageSize,title,status) {
    return request({
      url: `/eduservice/course/getCoursesByCondition/${current}/${pageSize}`,
      method: 'get',
      params: {
        title:title,
        status:status
      }
    })
  },
  deleteCourse(courseId) {
    return request({
      url: `/eduservice/course/deleteCourse/${courseId}`,
      method: 'delete',
    })
  },
}
